import rpyc
import threading
from setting import *

ryu_interface = None

def launch_rpyc_client():
    global ryu_interface
    ryu_interface = rpyc.connect(RYU_IP, RYU_RPYC_PORT).root
    print("Send rpyc connection request.")
    if(ryu_interface is not None):
        print("Connected to ryu.")
timer = threading.Timer(30, launch_rpyc_client).start()